#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "newprojectargs.h"
#include "newproject.h"
#include <QtGui>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
public slots:
    void createNewProject(newProjectArgs args);

private slots:
    void on_actionNew_triggered();

    void on_actionExit_triggered();

    void on_tabWidget_tabCloseRequested(int index);

    void on_rectButton_clicked();

    void on_selectButton_clicked();

    void on_circleButton_clicked();

    void on_curveButton_clicked();

    void on_textButton_clicked();

    void on_brushButton_clicked();

    void on_gradientButton_clicked();

    void on_fillButton_clicked();

    void on_picButton_clicked();

    void on_toolButton_clicked();

    void on_treeViewWidget_itemClicked(QTreeWidgetItem *item, int column);

    void toolsButtonGroupClicked(int id);

private:
    Ui::MainWindow *ui;

    QComboBox *fontSizeCombo;
    QFontComboBox *fontCombo;
    QAction *boldAction;
    QAction *underlineAction;
    QAction *italicAction;

    class QtDoublePropertyManager *doubleManager;
    class QtStringPropertyManager *stringManager;
    class QtColorPropertyManager *colorManager;
    class QtFontPropertyManager *fontManager;
    class QtPointPropertyManager *pointManager;
    class QtSizePropertyManager *sizeManager;

    QButtonGroup *toolsButtonGroup;

    class QtTreePropertyBrowser *propertyEditor;

    void createTextTools();
    void createToolsButtonGroup();
    void handleFontChange();
};

#endif // MAINWINDOW_H
